#pragma once
#include "RBTree.hpp"
namespace lw
{
	template<class K, class Compare = std::less<K>>
	class set
	{
		struct SetKofT
		{
			const K& operator()(const K& key) const
			{
				return key;
			}
		};
	public:
		typedef lw::RBTree<K, const K, SetKofT, std::less<K>>::const_iterator iterator;
		typedef lw::RBTree<K, const K, SetKofT, std::less<K>>::const_iterator const_iterator;
		iterator begin() const
		{
			return _t.begin();
		}
		iterator end() const
		{
			return _t.end();
		}
		size_t size() const
		{
			return _t.size();
		}
		bool empty() const
		{
			return _t.empty();
		}
		void clear()
		{
			_t.clear();
		}
		iterator find(const K& key)
		{
			return _t.Find(key);
		}
		const_iterator find(const K& key) const
		{
			return _t.Find(key);
		}
		std::pair<iterator, bool> insert(const K& key)
		{
			return _t.Insert(key);
		}

	private:
		lw::RBTree<K, const K, SetKofT, Compare> _t;
	};
}